<%@ Page Language="C#" MasterPageFile="~/SFMaster.master" AutoEventWireup="true"
    CodeFile="Photos.aspx.cs" Inherits="Admin_Photos"  %>

<%@ Register Assembly="WebControls" Namespace="WebControls" TagPrefix="cc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolderMain" runat="Server">
<table width=100%><tr><td>
    <cc1:SFGrid ID="sfgPhotos" runat="server" OnNeedsDataSource="sfgPhotos_NeedsDataSource"
        AutoGenerateColumns="False" IsMasterPageControl="False" IsProtectedForLanguageChange="False"
        OnRowCommand="sfgPhotos_RowCommand">
        <Columns>
            <asp:TemplateField>
                <itemtemplate>
                <asp:ImageButton id="ibtEdit" runat="server" CommandName="EditData" CommandArgument='<%#DataBinder.Eval(Container.DataItem,"PhotoId") %>' ImageUrl="~/images/edit.gif"></asp:ImageButton>
            </itemtemplate>
            </asp:TemplateField>
            <asp:TemplateField>
                <itemtemplate>
                <asp:ImageButton id="ibtDelete" runat="server" CommandName="DeleteData" CommandArgument='<%#DataBinder.Eval(Container.DataItem,"PhotoId") %>' ImageUrl="~/images/delete.gif"></asp:ImageButton>
            </itemtemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="PhotoDescription"></asp:BoundField>
            <asp:BoundField DataField="PhotoPath"></asp:BoundField>
        </Columns>
    </cc1:SFGrid>
    <cc1:SFButton ID="btnNew" runat="server" OnClick="btnNew_Click" /></td></tr></table>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolderEdit" runat="Server">
    <table>
        <tr>
            <td>
                <cc1:SFLabel ID="lblPhotoDescription" runat="server"></cc1:SFLabel>
            </td>
            <td colspan="2">
                <cc1:SFTextBox ID="txtPhotoDescription" runat="server" ControlsLabel="lblPhotoDescription"></cc1:SFTextBox>
            </td>
        </tr>
        <tr>
            <td>
                <cc1:SFLabel ID="lblPhotoAlbum" runat="server"></cc1:SFLabel>
            </td>
            <td colspan=2>
                <cc1:SFDropDownList ID="sfdPhotoAlbum" runat="server" ControlsLabel="lblPhotoAlbum" OnNeedsDataSource="sfdPhotoAlbum_NeedsDataSource"></cc1:SFDropDownList>
            </td>
        </tr>
        <tr>
            <td>
                <cc1:SFLabel ID="lblPhotoPath" runat="server"></cc1:SFLabel>
            </td>
            <td>
                <cc1:SFTextBox ID="txtPhotoPath" runat="server" ControlsLabel="lblPhotoPath" ></cc1:SFTextBox>
            </td>
            <td>
                <asp:ImageButton ID="ibtUploadFile" runat="server" ImageUrl="~/images/upload.gif" />
            </td>
        </tr>
        <tr>
            <td>
                <cc1:SFLabel ID="lblDatePictureTaken" runat="server"></cc1:SFLabel>
            </td>
            <td>
                <cc1:SFCalendar ID="calDatePictureTaken" runat="server" ControlsLabel="lblDatePictureTaken"></cc1:SFCalendar> 
                
              
            </td>
        </tr>
        <tr>
            <td colspan="3">
                <cc1:SFDataList ID="lstPhotos" runat="server" DataKeyField="PhotoContentId" OnNeedsDataSource="lstPhotos_NeedsDataSource"
                    OnItemDataBound="lstPhotos_ItemDataBound">
                    <ItemTemplate>
                        <table>
                            <tr>
                                <td valign="top">
                                    <cc1:SFCheckBox AutoPostBack="true" OnCheckedChanged="Check" ID="chkLanguage" runat="server"
                                        Text='<%#DataBinder.Eval(Container.DataItem,"LanguageName") %>' />
                                </td>
                            </tr>
                            <tr>
                                <td valign="top">
                                    <asp:Panel ID="pnlPhotoContents" runat="server">
                                        <table>
                                            <tr>
                                                <td valign="top">
                                                    <cc1:SFLabel ID="lblPhotoName" runat="server"></cc1:SFLabel>
                                                </td>
                                                <td>
                                                    <cc1:SFTextBox ID="txtPhotoName" ControlsLabel="lblPhotoName" runat="server" Text='<%#DataBinder.Eval(Container.DataItem,"PhotoName") %>'></cc1:SFTextBox>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td valign="top">
                                                    <cc1:SFLabel ID="lblPhotoContentDescription" runat="server"></cc1:SFLabel>
                                                </td>
                                                <td>
                                                    <cc1:SFTextBox ID="txtPhotoDescription" ControlsLabel="lblPhotoContentDescription"
                                                        runat="server" Text='<%#DataBinder.Eval(Container.DataItem,"PhotoDescription") %>'></cc1:SFTextBox>
                                                </td>
                                            </tr>
                                        </table>
                                    </asp:Panel>
                                </td>
                            </tr>
                        </table>
                    </ItemTemplate>
                    <SeparatorTemplate>
                        <hr />
                    </SeparatorTemplate>
                </cc1:SFDataList>
            </td>
        </tr>
        
    </table>
</asp:Content>
